import os
import django

os.environ.setdefault('DJANGO_SETTINGS_MODULE','backend.settings')
django.setup()

from WxApi.models import Application

def main():
    apps=Application.objects.all().order_by('id')
    for a in apps:
        print(f"id={a.id} name={a.name} type={a.app_type} active={a.is_active}")

if __name__=='__main__':
    main()
